package com.ruoyi.campus.service;

import java.util.List;
import java.util.Map;

import com.ruoyi.campus.domain.MyOrder;

/**
 * 订单Service接口
 *
 * @author zht
 * @date 2021-10-24
 */
public interface IMyOrderService
{
    /**
     * 查询订单
     *
     * @param orderId 订单主键
     * @return 订单
     */
    public MyOrder selectMyOrderByOrderId(String orderId);

    /**
     * 查询订单列表
     *
     * @param myOrder 订单
     * @return 订单集合
     */
    public List<MyOrder> selectMyOrderList(MyOrder myOrder);

    /**
     * 查询个人订单列表
     * @param myOrder 订单
     * @param userId 用户Id
     * @return 订单集合
     */
    public List<MyOrder> selectMyOrderListByUserId(MyOrder myOrder,Long userId);

    /**
     * 新增订单
     *
     * @param myOrder 订单
     * @return 结果
     */
    public int insertMyOrder(MyOrder myOrder);

    /**
     * 修改订单
     *
     * @param myOrder 订单
     * @return 结果
     */
    public int updateMyOrder(MyOrder myOrder);

    /**
     * 批量删除订单
     *
     * @param orderIds 需要删除的订单主键集合
     * @return 结果
     */
    public int deleteMyOrderByOrderIds(String[] orderIds);

    /**
     * 删除订单信息
     *
     * @param orderId 订单主键
     * @return 结果
     */
    public int deleteMyOrderByOrderId(String orderId);

    /**
     * 查询个人订单
     * @param userId 用户ID
     * @param orderStatus 订单状态
     * @return 结果
     */
    public List<Map<String, Object>> selectMyOrder(String userId, String orderStatus);

    /**
     * 评论订单
     * @param orderId 订单ID
     * @param evaluate 评价内容
     * @return 结果
     */
    public int evaluateOrderById(String orderId, String evaluate);

    /**
     * 更新商品状态
     * @param comId 商品Id
     * @return 结果
     */
    public int updateCommStatus(String comId);

    /**
     * 取消订单
     * @param orderId 订单Id
     * @param comId 商品Id
     * @return 结果
     */
    public int cancelOrder(String orderId, String comId);

    /**
     * 确认订单
     * @param orderId 订单Id
     * @return 结果
     */
    public int finishOrder(String orderId);
}
